<template>
  <view class="page">
    <!-- 自定义导航栏 -->
    <custom-navbar title="申请提现"></custom-navbar>
    
    <!-- 背景 -->
    <view class="background"></view>
    
    <!-- 成功状态 -->
    <view class="success-content">
      <view class="success-icon">
        <image src="/static/组 6@3x.png" mode="aspectFit" class="success-image"></image>
      </view>
      <view class="success-title">提交成功</view>
      <view class="success-desc">等待平台审核</view>
    </view>

    <!-- 返回首页按钮 -->
    <view class="home-button" @click="goHome">
      <text>返回首页</text>
    </view>
  </view>
</template>

<script>
export default {
  components: {
    'custom-navbar': () => import('@/components/custom-navbar.vue')
  },
  data() {
    return {
      withdrawData: {
        amount: '1000.00',
        method: '银行卡',
        account: '**** **** **** 1234',
        applyTime: '2024-03-15 14:30:00',
        expectedTime: '2024-03-18 18:00:00',
        orderNo: 'WD202403150001'
      }
    }
  },
  onLoad(options) {
    if (options.data) {
      // 从上一页传递的数据
      this.withdrawData = JSON.parse(decodeURIComponent(options.data));
    }
  },
  methods: {
    
    formatDateTime(timeStr) {
      const date = new Date(timeStr);
      return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
    },
    
    viewRecords() {
      uni.navigateTo({
        url: '/pages/finance/finance'
      });
    },
    
    goHome() {
      uni.redirectTo({
        url: '/pages/index/index'
      });
    }
  }
}
</script>

<style>
page {
  background-color: #F7F7F7;
}

.page {
  min-height: 100vh;
  position: relative;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    #2f81fa 0%, #2f81fa 25%,
    #f7f7f7 25%, #f7f7f7 100% 
  );
  z-index: 0;
}

.success-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120rpx 40rpx 0;
  background-color: white;
  margin: 0 20rpx;
  border-radius: 20rpx 20rpx 0 0;
  min-height: calc(100vh - 200rpx);
  margin-top: 88rpx;
  
 
  border-radius: 30rpx;
}

.success-icon {
  width: 160rpx;
  height: 160rpx;
  background: linear-gradient(135deg, #2f81fa 0%, #1e5bb8 100%);
  border-radius: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 40rpx;
  box-shadow: 0 8rpx 24rpx rgba(47, 129, 250, 0.4);
}

.success-image {
  width: 160rpx;
  height: 160rpx;
}

.success-title {
  font-size: 39rpx;
  font-weight: bold;
  color: #333333;
  margin-bottom: 20rpx;
  display: block;
}

.success-desc {
  font-size: 37rpx;
  color: #333333;
  margin-top: 100rpx !important;
  font-weight: 500;
  line-height: 1.4;
}

.home-button {
  position: absolute;
  bottom: 900rpx;
  left: 40rpx;
  right: 40rpx;
  height: 88rpx;
  background-color: #2f81fa;
  border-radius: 44rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4rpx 12rpx rgba(47, 129, 250, 0.3);
  z-index: 10;
}

.home-button text {
  color: white;
  font-size: 32rpx;
  font-weight: 500;
}
</style>

















